float4x4 xModelViewProjection;
float pos;

struct VertexToPixel
{
    float4 Position     : POSITION;
    float4 Color        : COLOR0;
};

struct PixelToFrame
{
    float4 Color        : COLOR0;
};

VertexToPixel SimplestVertexShader( float4 inPos : POSITION, float4 inColor : COLOR0)
{
    VertexToPixel Output = (VertexToPixel)0;
    
    Output.Position =mul(inPos, xModelViewProjection);

     //Output.Color = inColor;
     inColor[0] *= pos;
     inColor[1] *= pos;
     inColor[2] *= pos;
     
     
     Output.Color = inColor;
 
     return Output;
 }
 
 PixelToFrame OurFirstPixelShader(VertexToPixel PSIn)
 {
     PixelToFrame Output = (PixelToFrame)0;    
 
     Output.Color = PSIn.Color;    
 
     return Output;
 }
 
 technique Simplest
 {
     pass Pass0
     {
         VertexShader = compile vs_1_1 SimplestVertexShader();
         PixelShader = compile ps_1_1 OurFirstPixelShader();
     }
 }